package se.perp.c4.model;

import java.io.Serializable;
import se.perp.c4.model.Actor.EActor;
import se.perp.c4.model.Territory.ETerritory;

public class Move implements Serializable {

    public final EActor attacker,  defender;
    public final ETerritory from,  to;

    public Move(EActor attacker, EActor defender, ETerritory from, ETerritory to) {
        if (attacker == null || defender == null || from == null || to == null) throw new IllegalArgumentException();
        this.attacker = attacker;
        this.defender = defender;
        this.from = from;
        this.to = to;
    }

    @Override
    public String toString() {
        return "[" + attacker + " (" + from + ")] => [" + defender + " (" + to + ")]";
    }
}
